import Router from 'koa-router';
import { signupController } from '@/controllers/user/signup';
import { signinController } from '@/controllers/user/signin';
import { refreshTokenController } from '@/controllers/user/refreshToken';
import { userProfileController } from '@/controllers/user/profile';
import { editProfileController } from '@/controllers/user/edit';
import { queryUsersController } from '@/controllers/user/queryUsers';

export const userRouter = new Router({ prefix: '/user' });

// 刷新token
userRouter.post('/refresh-token', refreshTokenController);

// 用户注册
userRouter.post('/signup', signupController);

// 用户登录
userRouter.post('/signin', signinController);

// 获取用户信息
userRouter.post('/profile', userProfileController);

// 修改用户信息
userRouter.post('/edit-profile', editProfileController)

// 获取用户列表
userRouter.post('/list', queryUsersController);

